package com.neuedu.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.alibaba.fastjson.JSONObject;

import com.neuedu.model.Test;
import com.neuedu.service.testService;

@Controller
@RequestMapping("/test")
public class TestAction {
	@Autowired
	private testService testservice;

	@RequestMapping(value = "/findAll")
	public String findAll(HttpServletRequest request, HttpServletResponse response) throws Exception {
		Map<String, Object> map = new HashMap<String, Object>();
		Map<String, Object> pageMap = new HashMap<String, Object>();

		List<Test> u = testservice.findAll(pageMap);
		if (u != null) {
			System.out.println("action里面有数据");
		} else {
			System.out.println("无数据");
		}
		int total = testservice.countTest();
		request.setAttribute("aa", u);

		return "test1";
	}
}
